from socket import *

def netSend( ip ):
    cl = socket(AF_INET , SOCK_STREAM)
    cl.connect((  ip ,6000))
    
    #cl.send('python("print \'\n\n\n\'");')
    #cl.send('python("print \'===============================\'");')
    #cl.send('python("print \'antLowCount : 3000 \' ");')
    #cl.send('python("print \'antMiddleCount : 2000 \' ");')
    #cl.send('python("print \'antHighCount : 100 \'");')
    #cl.send('python("print \'timeMax : 120 \'");')    
    #cl.send('python("print \'===============================\"");')
    cl.send('python("import AntsCrowd.Scene as Scene");')
    cl.send('python("import profile");')
    cl.send('python("reload(Scene)");')
    cl.send('python("_scene = Scene.Scene()");')
    cl.send('python("state = \'goal\'");')
    cl.send('python("antLowCount = 2000 ");')
    cl.send('python("antMiddleCount = 1000 ");')
    cl.send('python("antHighCount = 100 ");')
    cl.send('python("timeMax = 120 ");')    
    cl.send('python("cmd = \'_scene.run(loddist = [2000,6000,11000], terrainHeight = 0,terrainCheck = 1,antLowCount = antLowCount , antMiddleCount = antMiddleCount , antHighCount = antHighCount, antState = state, timeMax = timeMax )\'");')
    cl.send('python("profile.run( cmd )");')
    
    
    
    
netSend( '192.168.131.253')
